<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Clientes</title>

<script type="text/javascript">
	function abm(action) {
		document.getElementById('action').setAttribute('value', action);
		//var form = document.frm_clientes;
		document.cliente.submit();
	}
</script>

</head>
<script type="text/javascript">
	function validar() {
		if ("<c:out value="${error.mensaje}"/>" != "") {
			alert(<c:out value="${error.mensaje}"></c:out>);

		}
	}
</script>

<body onload="validar();">

	<jsp:useBean id="ban" scope="session"
		class="ar.edu.utn.frgp.beans.MessageBean">
	</jsp:useBean>
	<jsp:useBean id="error" scope="request"
		class="ar.edu.utn.frgp.beans.MessageBean" />

	
	<form action="Clientes" name="cliente">
	<p align="center">
		<input type="button" value="Agregar" onclick="abm('agregar')" /> 
		<input type="button" value="Modificar" onclick="abm('modificar')" /> 
		<input type="button" value="Eliminar" onclick="abm('eliminar')" />
		<input type="hidden" id="action"/>
	</p>
	<p align="center">
		<c:out value="${ban.mensaje}"></c:out>
</p>
	
	</form>

</body>
</html>